package com.zaicheng.cloud.remotecall;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.PARAMETER, ElementType.FIELD, ElementType.METHOD})
public @interface Param {
    String value();

    Class<? extends Param.Expander> expander() default Param.ToStringExpander.class;

    /** @deprecated */
    boolean encoded() default false;

    public static final class ToStringExpander implements Param.Expander {
        public ToStringExpander() {
        }

        @Override
        public String expand(Object value) {
            return value.toString();
        }
    }

    public interface Expander {
        String expand(Object var1);
    }
}